import DefaultTheme from 'vitepress/theme'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'

// 引入图标文件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// VPDemo组件渲染演示demo
import 'normalize.css'
import VPDemo from '../vp-demo/index.vue'
import './css-vars.scss'
import './index.scss'

// import JztUi from 'jzt-ui'
// import 'jzt-ui/theme-chalk/index.css'

import JztUi from "../../../packages/index.js"
import '../../../packages/theme-chalk/index.scss'

export default {
	...DefaultTheme,
	async enhanceApp({ app,  siteData }) {
		app.use(ElementPlus)
		app.use(JztUi)
		// 全局注册图标组件
		for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
			app.component(`IEp${key}`, component)
			app.component(key, component)
		}
		app.component('Demo', VPDemo)
	},
}
